﻿using System;
using System.Collections.Generic;
using DevExpress.Xpo;
using System.Text;

namespace BusinessObjects
{
    public class DiaChi : XPObject
    {
        public DiaChi()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public DiaChi(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        //Fields
        string fToaNha = string.Empty;
        [Size(500)]
        public string ToaNha
        {
            get { return fToaNha; }
            set { SetPropertyValue<string>("ToaNha", ref fToaNha, value); }
        }
        string fSoNha = string.Empty;
        [Size(100)]
        public string SoNha
        {
            get { return fSoNha; }
            set { SetPropertyValue<string>("SoNha", ref fSoNha, value); }
        }
        string fTenDuong = string.Empty;
        [Size(500)]
        public string TenDuong
        {
            get { return fTenDuong; }
            set { SetPropertyValue<string>("TenDuong", ref fTenDuong, value); }
        }
        string fPhuongXa = string.Empty;
        [Size(50)]
        public string PhuongXa
        {
            get { return fPhuongXa; }
            set { SetPropertyValue<string>("PhuongXa", ref fPhuongXa, value); }
        }
        QuanHuyen fQuanHuyen;
        [Association(@"DiaChiReferencesQuanHuyen")]
        public QuanHuyen QuanHuyen
        {
            get { return fQuanHuyen; }
            set { SetPropertyValue<QuanHuyen>("QuanHuyen", ref fQuanHuyen, value); }
        }
        TinhThanh fTinhThanh;
        [Association(@"DiaChiReferencesTinhThanh")]
        public TinhThanh TinhThanh
        {
            get { return fTinhThanh; }
            set { SetPropertyValue<TinhThanh>("TinhThanh", ref fTinhThanh, value); }
        }
        CongTy fCongTy;
        [Association(@"DiaChiReferencesCongTy")]
        public CongTy CongTy
        {
            get { return fCongTy; }
            set { SetPropertyValue<CongTy>("CongTy", ref fCongTy, value); }
        }
    }
}
